$jQ.fn.ordenarNumeros = function()	{
	
	var selectedValue = $jQ(this).val();
	
	$jQ(this).html($jQ("option", $jQ(this)).sort(function(a, b) {

		//a = replaceAll(a.text, ".", "");
		//b = replaceAll(b.text, ".", "");
		
		aTemp = a.text.replace(/[^0-9,\.]|/g, "");
		bTemp = b.text.replace(/[^0-9]/g, "");
		
		clog(aTemp);
		
		
		
		if ($jQ(a).attr("value") == "" || $jQ(b).attr("value") == "") {
			return -1;
		}
		
		if (aTemp == "") {
			return 1;
		}
		
		if (bTemp == "") {
			return -1;
		}
		
		aTemp = parseInt(aTemp, 10);
		bTemp = parseInt(bTemp, 10);
		
		return aTemp == bTemp ? 0 : aTemp < bTemp ? -1 : 1;
	}));

	$jQ(this).val(selectedValue);
    
};

$jQ.fn.selecionarIndice = function(indice) {
	
	if ($jQ(this).is("select")) {
		return $jQ(this).find("option:nth-child(" + indice +")").attr("selected", "selected");
	}
};

$jQ.fn.valorSelecionado = function() {
	
	if ($jQ(this).is("select")) {
		return $jQ(this).find("option:selected").text();
	}
};

$jQ.fn.habilitar = function() {
	return $jQ(this).removeAttr("disabled");
};

$jQ.fn.desabilitar = function() {
	return $jQ(this).attr("disabled", "disabled");
};